<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 子代选择器 >  */
        .box > p{
            border: 1px solid red;
        }

        /* 后代选择器 空格 */
        .box p{
            color: red;
        }
    </style>
</head>
<body>
    <div class="box">
        <p>.box p</p>
        <div class="item">
            <p>.item p</p>
        </div>
        <p>.box p</p>
    </div>
</body>
</html>